package cn.bfay.lion.jingdong.config;

import org.springframework.amqp.core.Queue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * RabbitMqConfig.
 *
 * @author wangjiannan
 */
@Configuration
public class RabbitMqConfig {
    /**
     * 队列名
     */
    @Value("${jingdong.product.discount.notice.queue}")
    private String noticeQueue;

    /**
     * 定义string队列.
     *
     * @return Queue
     */
    @Bean
    public Queue noticeQueue() {
        return new Queue(noticeQueue);
    }
}
